<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/kendocommon.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <title>Popup editing</title>
    <meta charset="utf-8">
    <style>
    	body {
			padding: 0;
			font-size: 12px;
		}
    </style>
</head>
<script>
	$(document).ready(function() {
		var admissionDataSource = new kendo.data.DataSource({
            transport:{
                read:{
                    url: "${path}/common/getBaseCodeList?type=admission_way",
                    dataType: "json"
                }
            }
        });
	
		$("#admission_way").kendoComboBox({
		    dataTextField: "name",
		    dataValueField: "code",
		    dataSource: admissionDataSource
		});
		
	});
	
	var subRegister = function(){
		//var formval = JsonCode(register);
		var formval = $('#register').serialize(); 
		//console.log(formval);
		//formval = JSON.stringify(formval);
		//console.log(formval);
		$.ajax({
            url: spera.sperasso_path+'/ssoApi/registerByAssist',
            data: formval,
            dataType: 'jsonp',
            success: function(doc) {
            	toastr.info(doc.msg, "提示", toastrOptsTop);
            }
        });
	}
	
</script>
<body style="padding:10px">
	<form id="register" name="register" action="" method="post">
	<input type="hidden" name="t_user_id" id="t_user_id" value="${t_user_id}"/>
	<input type="hidden" name="t_username" id="t_username" value="${t_username}"/>
	<div style="width:100%;padding-top:50px;text-align:center;">
		<table style="width:100%;padding:2px;text-align:center">
			<tr>
				<td>
					<label>手机号</label>
				</td>
				<td style="text-align:left">
					<input type="text" placeholder="手机号" name="phone" id="phone" style="width:250px;margin:2px" class="k-textbox">
				</td>
				<td colspan="2">
                </td>
			</tr>
			<tr>
				<td>
					<label>入会途径</label>
				</td>
				<td style="text-align:left">
					<input name="admission_way" id="admission_way" style="width:250px;margin:2px">
				</td>
				<td>
					<label>入会活动</label>
				</td>
				<td style="text-align:left">
					<input style="width:250px;margin:2px" name="admission_way_id" id="admission_way_id" class="k-textbox">
				</td>
			</tr>
			<tr>
				<td>
					<label>入会备注</label>
				</td>
				<td colspan="3" style="text-align:left">
					<textarea name="admission_note" id="admission_note" style="width:90%;height:150px;margin:2px" class="k-textbox"></textarea>
                </td>
			</tr>
		</table>
	</div>
    </form>
    <div style="text-align:center;">
    	<button  class="btn" onclick="subRegister()">
        	确认注册
    	</button>
    </div>
</body>
</html>
